'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace OLE

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
    <Guid(IID.OLE.ICreateTypeInfo2)> _
    Public Interface ICreateTypeInfo2
        <PreserveSig()> Function AddFuncDesc(ByVal index As UInteger, ByRef pFuncDesc As FuncDesc) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function AddImplType(ByVal index As UInteger, ByVal hRefType As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function AddRefTypeInfo(ByRef pTInfo As ITypeInfo, <Out()> ByVal phRefType As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function AddVarDesc(ByVal index As UInteger, ByRef pVarDesc As VarDesc) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function DefineFuncAsDllEntry(ByVal index As UInteger, <MarshalAs(UnmanagedType.LPWStr)> ByVal szDllName As String, <MarshalAs(UnmanagedType.LPWStr)> ByRef szProcName As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function LayOut() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetAlignment(ByVal cbAlignment As UShort) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetDocString(<MarshalAs(UnmanagedType.LPWStr)> ByVal pStrDoc As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFuncAndParamNames(ByVal index As UInteger, <MarshalAs(UnmanagedType.LPArray, ArraySubType:=UnmanagedType.LPWStr)> ByRef rgszNames() As String, ByVal cNames As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFuncDocString(ByVal index As UInteger, <MarshalAs(UnmanagedType.LPWStr)> ByVal szDocString As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFuncHelpContext(ByVal index As UInteger, ByVal dwHelpContext As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetGuid(ByRef rguid As Guid) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetHelpContext(ByVal dwHelpContext As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetImplTypeFlags(ByVal index As UInteger, ByVal implType As ImplTypeFlags) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetMops(ByVal index As UInteger, <MarshalAs(UnmanagedType.BStr)> ByVal pMops As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetTypeDescAlias(ByRef pTDescAlias As TypeDesc) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetTypeFlags(ByVal uTypeFlags As TypeFlags) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetVarDocString(ByVal index As UInteger, <MarshalAs(UnmanagedType.LPWStr)> ByVal szDocString As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetVarHelpContext(ByVal index As UInteger, ByVal dwHelpContext As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetVarName(ByVal index As UInteger, <MarshalAs(UnmanagedType.LPWStr)> ByVal szName As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetVersion(ByVal wMajorVerNum As UShort, ByVal wMinorVerNum As UShort) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function DeleteFuncDesc(ByVal index As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function DeleteFuncDescByMemId(ByVal memid As Integer, ByVal invKind As InvokeKind) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function DeleteImplType(ByVal index As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function DeleteVarDesc(ByVal index As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function DeleteVarDescByMemId(ByVal memid As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetCustData(ByRef guid As Guid, ByVal pVarVal As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFuncCustData(ByVal index As UInteger, ByRef guid As Guid, ByVal pVarVal As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFuncHelpStringContext(ByVal index As UInteger, ByVal dwHelpStringContext As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetHelpStringContext(ByVal dwHelpStringContext As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetImplTypeCustData(ByVal index As UInteger, ByRef guid As Guid, ByVal pVarVal As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetName(<MarshalAs(UnmanagedType.LPWStr)> ByVal szName As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetParamCustData(ByVal indexFunc As UInteger, ByVal indexParam As UInteger, ByRef guid As Guid, ByVal pVarVal As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetVarCustData(ByVal index As UInteger, ByRef guid As Guid, ByVal pVarVal As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetVarHelpStringContext(ByVal index As UInteger, ByVal dwHelpStringContext As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace